<?php
namespace addons\TfFutures\backend\controllers;

use yii\data\Pagination;
use addons\TfFutures\common\models\SymbolToa;

class SymbolToaController extends BaseController
{
    public $modelClass = SymbolToa::class;
    /**
     * 首页
     *
     * @return string
     */
    public function actionIndex()
    {
        $data   = $this->modelClass::find();
        $pages  = new Pagination(['totalCount' => $data->count(), 'pageSize' => $this->pageSize]);
        $models = $data->offset($pages->offset)->orderBy('member_id desc')->limit($pages->limit)->all();

        return $this->render($this->action->id, [
            'models' => $models,
            'pages' => $pages
        ]);
    }
}